package com.yummy.service.impl;

import com.yummy.entity.ShoppingCart;
import com.yummy.mapper.OrderDetailMapper;
import com.yummy.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yinbo
 */
@Service
public class OrderDetailServiceImpl implements OrderDetailService {

	@Autowired
	OrderDetailMapper orderDetailMapper;

	@Override
	public boolean addBatch(List<ShoppingCart> cartList, Long orderId) {
		return orderDetailMapper.insertBatch(cartList,orderId)>0;
	}
}
